package chapter10;

/**
 * Created by lenovo on 2016/4/10.
 */
/*
public class ThreadTest {
    public static void main(String[] args) {
        Thread someThread=new Thread(){
            public void run(){
                System.out.println("输出结果了");
            }
        };
        someThread.start();

    }
}
*/
/*
public class ThreadTest {
    public static void main(String[] args) {
        new Thread(() -> {
                System.out.println("输出结果了");
            }).start();
       // someThread.start();

    }
}
*/

public class ThreadTest {
    public static void main(String[] args) {
        Thread someThread=new Thread(){
            public void run(){
                while (true) {
                    System.out.println("输出结果了");
                }
            }
        };
        someThread.setDaemon(true);

        someThread.start();
 //       System.out.println("有有有有有");
    }
}